/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/

package com.team1160.breakaway;


import edu.wpi.first.wpilibj.IterativeRobot;
import com.team1160.breakaway.model.Robot;
import com.team1160.breakaway.api.Constants;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the IterativeRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class Team1160 extends IterativeRobot {
    //Instance Fields
    ////////////////////////////////////////////////////////////////////////////
    private Robot model = Robot.getModel();

    //Functions
    ////////////////////////////////////////////////////////////////////////////

    //robot init function
    ////////////////////////////////////////////////////////////////////////////
    public void robotInit() {

    }

    
    //init funcitons
    ////////////////////////////////////////////////////////////////////////////
    public void disabledInit(){
        //add disabled to init for disabledInit can also use |
        model.setState(Constants.DISABLED+Constants.INIT);
    }
    public void autonomousInit(){
        model.setState(Constants.AUTONOMOUS+Constants.INIT);
    }
    public void teleopInit(){
        model.setState(Constants.TELEOP+Constants.INIT);
    }
    
    
    //Periodic functions
    ////////////////////////////////////////////////////////////////////////////
    public void disabledPeriodic(){
        model.setState(Constants.DISABLED+Constants.PERIODIC);
    }
    public void autonomousPeriodic() {
        model.setState(Constants.AUTONOMOUS+Constants.PERIODIC);
    }
    public void teleopPeriodic() {
        model.setState(Constants.TELEOP+Constants.PERIODIC);
    }



    //continuous functions
    ////////////////////////////////////////////////////////////////////////////
    public void disabledContinuous(){
        model.setState(Constants.DISABLED+Constants.CONTINUOUS);
    }
    public void autonomousContinuous(){
        model.setState(Constants.AUTONOMOUS+Constants.CONTINUOUS);
    }
    public void teleopContinuous(){
        model.setState(Constants.TELEOP+Constants.CONTINUOUS);
    }
    
}
